package dataStructure.xmg1.a12.set;

/**
 * @author: vince_zww
 * @date: 2021/3/16 23:42
 * @desceription:
 */
public interface Set<E> {
    int size();

    boolean isEmpty();

    void clear();

    boolean contains(E element);

    void add(E element);

    void remove(E element);

    void traversal(dataStructure.xmg1.a11.set.Set.Visitor<E> visitor);

    public static abstract class Visitor<E>{
        boolean stop;
        public abstract boolean visit(E element);
    }
}
